import apiRequest from './../../utils/api-request'

const baseUrl = 'http://47.94.1.148:8080'

/**
 * 获取博客列表
 * @param {*} params
 */
function listPost(params) {
  return new Promise((resolve, reject) => {
    const url = baseUrl + '/blog/post/list'
    apiRequest.Get(url, params).then(
      r => {
        resolve(r)
      },
      e => {
        reject(e)
      }
    )
  })
}

/**
 * 获取文章内容
 * @param {*} params
 */
function getArticle(url,params) {
  return new Promise((resolve, reject) => {
    apiRequest.Get(url, params).then(
      r => {
        resolve(r)
      },
      e => {
        reject(e)
      }
    )
  })
}



module.exports = {
  listPost
}
